﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace BasicCMS.Mvc.ViewEngine
{
    public class BasicCMSViewEngine : RazorViewEngine
    {
        public BasicCMSViewEngine()
        {
            this.ViewLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml" };
            this.PartialViewLocationFormats = this.ViewLocationFormats;
            this.MasterLocationFormats = new string[] { "~/Views/Shared/{0}.cshtml" };

            this.AreaViewLocationFormats = new string[] { "~/Modules/{2}/Views/{1}/{0}.cshtml" };
            this.AreaPartialViewLocationFormats = this.AreaViewLocationFormats;
            this.AreaMasterLocationFormats = new string[] { "~/Views/Shared/{0}.cshtml", "~/{2}/Views/Shared/{0}.cshtml" };
        }
    }
}
